package com.sh.bean;

import java.io.Serializable;

/**
 * @Auther: sh
 * @Version 1.0
 * @Description: 员工类
 */
public class Employee implements Serializable, Comparable<Employee> {
    /**
     * 职工号(不能重复)，姓名，性别，出生年月，学历，职务，工资，住址，电话
     */
    private static final long serialVersionUID = 1L;
    private String id;
    private String name;
    private String gender;
    private String birth;
    private String edu;
    private String job;
    private double salary;
    private String address;
    private String phone;

    public Employee(String id, String name, String gender, String birth, String edu, String job, double salary, String address, String phone) {
        this.id = id;
        this.name = name;
        this.gender = gender;
        this.birth = birth;
        this.edu = edu;
        this.job = job;
        this.salary = salary;
        this.address = address;
        this.phone = phone;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    public String getEdu() {
        return edu;
    }

    public void setEdu(String edu) {
        this.edu = edu;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", birth='" + birth + '\'' +
                ", edu='" + edu + '\'' +
                ", job='" + job + '\'' +
                ", salary=" + salary +
                ", address='" + address + '\'' +
                ", phone='" + phone + '\'' +
                '}';
    }

    @Override
    public int compareTo(Employee o) {
        return Integer.parseInt(this.id) - Integer.parseInt(o.getId());
    }
}

